 -<lscript  src="native-click-simulator.js">
</lscript>
 
<!--
<script  type="module">
import clickSimulator from './native-click-simulator.js';
//NativeClickSimulator
// 通过元素引用模拟点击
const button = document.getElementById('my-button');
clickSimulator.simulateClick(button);

// 通过选择器模拟点击
clickSimulator.simulateClickBySelector('.submit-btn');

// 模拟右键点击
clickSimulator.simulateRightClick(document.querySelector('.context-menu-target'));
</script>
-->
<button id="my-button" onclick="alert(1);"></button>
<script   >

//const button = document.getElementById('my-button');
//var clickSimulator = new NativeClickSimulator();
//NativeClickSimulator.simulateClick(button);
</script>

<!-- 在页面中引入脚本 -->
<script src="native-click-simulatorv3.js"></script>

<!-- 使用示例 -->
<script>
  // 通过元素ID获取元素并模拟点击
  const button2 = document.getElementById('my-button');
  NativeClickSimulator.simulateClick(button2);

  // 通过选择器模拟点击
 // NativeClickSimulator.simulateClickBySelector('.submit-btn');

  // 模拟右键点击
  //const menuItem = document.querySelector('.context-menu');
 // NativeClickSimulator.simulateRightClick(menuItem);
</script>